#ifndef __ZIP_FILE_H__
#define __ZIP_FILE_H__

#include "./iostub.h"

class ZipFile : public IOStub
{
public:
	ZipFile(string strZipPath);
	~ZipFile();

	bool OpenFile(string strPath, IoOpen openflag = IO_OPEN_READ);
	void CloseFile();

	size_t ReadFile(byte* buffer, size_t size);
	size_t WriteFile(const byte* buffer, size_t size);
	long SeekFile(long offset, IoSeek origin);
	long TellFile();

private:
	size_t GetFileLength();

private:
	unzFile m_fZip;
	unz_file_info m_fZipInfo;
};

#endif